﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="frmGestionarEmpleado.aspx.cs" Inherits="Presentacion.frmGestionarEmpleado" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    &nbsp;
    <asp:Label ID="Label1" runat="server" Text="Ingrese Nombre: "></asp:Label>
&nbsp;&nbsp;    <asp:TextBox ID="txtBusca" runat="server" Width="264px"></asp:TextBox>
<asp:Button ID="btnBuscar" runat="server" onclick="btnBuscar_Click" 
    Text="Buscar" />

<asp:Button ID="btnNuevo" runat="server" onclick="btnNuevo_Click" 
    Text="Nuevo Empleado" Width="135px" />
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
        AutoGenerateColumns="False" CellPadding="4" DataSourceID="ObjectDataSource1" 
        ForeColor="#333333" GridLines="None" Width="800px">
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
        <Columns>
            <asp:BoundField DataField="Id" HeaderText="Id" SortExpression="Id" />
            <asp:BoundField DataField="NombreCompleto" HeaderText="Nombre Completo" 
                SortExpression="NombreCompleto" ReadOnly="True" />
            <asp:BoundField DataField="Direccion" HeaderText="Direccion" 
                SortExpression="Direccion" />
            <asp:BoundField DataField="Dni" HeaderText="Dni" SortExpression="Dni" />
            <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
            <asp:BoundField DataField="Telefono" HeaderText="Telefono" 
                SortExpression="Telefono" />
            <asp:HyperLinkField DataNavigateUrlFields="Id" 
                DataNavigateUrlFormatString="frmEmpleado.aspx?acc=editar&amp;idAlm={0}" 
                Text="Editar" HeaderText="Accion" />
        </Columns>
        <EditRowStyle BackColor="#999999" />
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#E9E7E2" />
        <SortedAscendingHeaderStyle BackColor="#506C8C" />
        <SortedDescendingCellStyle BackColor="#FFFDF8" />
        <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
    </asp:GridView>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
        SelectMethod="BuscarEmpleadoPorNombre" TypeName="BL.EmpleadoBL">
        <SelectParameters>
            <asp:ControlParameter ControlID="txtBusca" DefaultValue="%" Name="nombre" 
                PropertyName="Text" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>
<br />
</asp:Content>